﻿using Demo.Net.Dapper;
using Demo.Net.Dapper.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo.Net.Service.Service
{
    public class DapperService
    {

        private readonly DapperDbCom _dapperCom;
        public DapperService(DapperDbCom dapperDbCom)
        {
            _dapperCom = dapperDbCom;
        }


        /// <summary>
        /// 简单测试 获取全部用户
        /// </summary>
        /// <returns></returns>
        public async Task<List<tusr_user>> GetTest()
        {
            var userList = await  _dapperCom.GetAllAsync<tusr_user>();
            return userList.ToList();
        }
    }
}
